<template>
    <div :class="show===false&&'hide'">
        <Breadcrumb class="bread">
            <Breadcrumb-item to="/">首页</Breadcrumb-item>
            <Breadcrumb-item to="/">{{$route.meta.name}}</Breadcrumb-item>
        </Breadcrumb>
    </div>
</template>
<script>
export default {
    data() {
        return {
            show: true,
        }
    },
    mounted() {
        this.test()
    },
    methods: {
        test() {
            console.log("equal-->" ,this.$route.path==="/")
            if (this.$route.path==="/") {
                this.show = false;
                console.log("false,")
            } else {
                this.show = true;
                console.log("true,")
            }
        }
    },
    watch: {
        $route(){
            this.test()
        }
    }
}
</script>
<style scoped lang='scss'>
    .hide{
        visibility: hidden;
        .bread{
            margin: 0;
        }
    }
</style>